<?php

/**
 * InputShipForecast form base class.
 *
 * @method InputShipForecast getObject() Returns the current form's model object
 *
 * @package    TMD
 * @subpackage form
 * @author     Thaihosting
 */
abstract class BaseInputShipForecastForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'DTTIME_FORECAST' => new sfWidgetFormInputHidden(),
      'ISHIP_REGION'    => new sfWidgetFormInputHidden(),
      'DTSAVE_TIME'     => new sfWidgetFormDateTime(),
      'IUSER_ID'        => new sfWidgetFormInputText(),
      'SDESC_TH'        => new sfWidgetFormTextarea(),
      'SDESC_ENG'       => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'DTTIME_FORECAST' => new sfValidatorChoice(array('choices' => array($this->getObject()->getDttimeForecast()), 'empty_value' => $this->getObject()->getDttimeForecast(), 'required' => false)),
      'ISHIP_REGION'    => new sfValidatorChoice(array('choices' => array($this->getObject()->getIshipRegion()), 'empty_value' => $this->getObject()->getIshipRegion(), 'required' => false)),
      'DTSAVE_TIME'     => new sfValidatorDateTime(),
      'IUSER_ID'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'SDESC_TH'        => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SDESC_ENG'       => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('input_ship_forecast[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'InputShipForecast';
  }


}
